package com.yuanchu.store.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanchu.common.utils.PageResult;
import com.yuanchu.common.utils.PageUtils;
import com.yuanchu.store.dto.DeliveryParamsDto;
import com.yuanchu.store.entity.YoshopDeliveryEntity;
import com.yuanchu.store.entity.YoshopDeliveryRuleEntity;

import java.util.List;
import java.util.Map;

/**
 * 配送模板主表
 *
 * @author adan
 * @email 2028038953@gmail.com
 * @date 2023-12-19 20:57:23
 */
public interface YoshopDeliveryService extends IService<YoshopDeliveryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 配送信息查询
     * @param params
     * @return
     */
    List<YoshopDeliveryEntity> queryGoodsDelivery(Map<String, Object> params);

    /**
     * 根据id查询配送信息
     * @param deliveryId
     * @return
     */
    YoshopDeliveryEntity queryDeliveryById(Integer deliveryId);

    /**
     * 根据id查询配送运费
     * @param deliveryId id
     * @return
     */
    YoshopDeliveryRuleEntity queryDeliveryBigDecimalById(Integer deliveryId);

    /**
     * 配送信息查询接口
     * @param page
     * @param search
     * @return
     */
    PageResult<YoshopDeliveryEntity> queryDeliveryList(Integer page, String search);

    /**
     * 添加配送模板
     * @param params
     */
    void saveDelivery(DeliveryParamsDto params);

    /**
     * 修改配送模板
     * @param params
     */
    void updateDelivery(DeliveryParamsDto params);

    /**
     * 删除配送模板
     * @param deliveryId
     */
    void deleteDelivery(Integer deliveryId);

    /**
     * 查询物流详情接口
     * @param deliveryId
     * @return
     */
    YoshopDeliveryEntity queryExpressDetail(Integer deliveryId);
}

